package com.iu.eblood.model;

import java.io.Serializable;
import javax.persistence.*;
import java.sql.Timestamp;


/**
 * The persistent class for the USERROLE database table.
 * 
 */
@Entity
public class Userrole implements Serializable {
	private static final long serialVersionUID = 1L;
	private UserrolePK id;
	private Timestamp createddate;
	private Timestamp deleteddate;
	private String isactive;
	private Role role;
	private User user;

    public Userrole() {
    }


	@EmbeddedId
	public UserrolePK getId() {
		return this.id;
	}

	public void setId(UserrolePK id) {
		this.id = id;
	}
	

	public Timestamp getCreateddate() {
		return this.createddate;
	}

	public void setCreateddate(Timestamp createddate) {
		this.createddate = createddate;
	}


	public Timestamp getDeleteddate() {
		return this.deleteddate;
	}

	public void setDeleteddate(Timestamp deleteddate) {
		this.deleteddate = deleteddate;
	}


	public String getIsactive() {
		return this.isactive;
	}

	public void setIsactive(String isactive) {
		this.isactive = isactive;
	}


	//bi-directional many-to-one association to Role
    @ManyToOne
	@JoinColumn(name="ROLEID")
	public Role getRole() {
		return this.role;
	}

	public void setRole(Role role) {
		this.role = role;
	}
	

	//bi-directional many-to-one association to User
    @ManyToOne
	@JoinColumn(name="USERID")
	public User getUser() {
		return this.user;
	}

	public void setUser(User user) {
		this.user = user;
	}
	
}